<%-- 
    Document   : register
    Created on : Apr 29, 2011, 5:56:54 PM
    Author     : Kevin
--%>

<%@page contentType="text/html" import="com.movie.*" pageEncoding="UTF-8"%>
<%@include file="header.html"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Register Page</title>
        <script type="text/javascript">
            function validate(){
                with(document.form1){
                    if(password.value.length < 1){
                        alert("please input password");
                        password.focus();
                        return false;                        
                    }
                    if(password.value.length < 5){
                        alert("password must be more than 6 characters");
                        password.focus();
                        return false;                        
                    }
                    if(password.value.length > 20){
                        alert("password must be less than 20 characters");
                        password.focus();
                        return false;                        
                    }
                    if(username.value.length < 1){
                        alert("please input username");
                        username.focus();
                        return false;                        
                    }
                    if(username.value.length > 20){
                        alert("username must be less than 20 characters");
                        username.focus();
                        return false;                        
                    }
                   
                    if(email.value.length < 1){
                        alert("please input email");
                        email.focus();
                        return false;                        
                    }
                   
                }   
                return true;
            }
                
        
            
        </script>
    </head>
    <body>
        
        <form name="form1" onsubmit="return validate();" action="dispatcher?operation=register" method="post">
            <table border="0">
                 <tr>
                    <td>username:</td>
                    <td>            <input type="text" name="username"  size="20">
                    </td>
                </tr>
                <tr>
                <tr>
                    <td>password:</td>
                    <td>            <input type="password" name="password"  size="20">
                    </td>
                </tr>
                
                    <td>email:</td>
                    <td>            <input type="text" name="email" size="20"><br>
                    </td>
                </tr>
                
                <tr>
                    <td></td>
                    <td> <input type="submit" value="submit">&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp<input type="button" value="cancel" onclick="javascript:location.href='myprofile.jsp'"</td>
                </tr>
            </table>




        </form>



    </body>
    <%@include file="footer.html"%>
</html>